package com.hshoesmall.demo.controller;
import com.hshoesmall.demo.common.api.ApiResult;
import com.hshoesmall.demo.mapper.ShoesRanksInfoMapper;

import com.hshoesmall.demo.model.entity.ShoesRanksInfo;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api")
public class ShoesRanksInfoController {
    @Resource
    ShoesRanksInfoMapper shoesRanksInfosMapper;

    //获取所有用户信息的接口
    @PostMapping("/shoesRanksInfos") //get请求
    public ApiResult<List<ShoesRanksInfo>> getUserInfos(){
        shoesRanksInfosMapper.ShoesRanksInfos();
        List<ShoesRanksInfo> allShoesRanksInfos = shoesRanksInfosMapper.ShoesRanksInfos();
        return ApiResult.success(allShoesRanksInfos) ;
    }

}

